<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mdsproject/mds_dataserveconfig/Mds_DataServeConfig.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mdsproject/mds_dataserveconfig/Mds_DataServeConfig.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Mds_DataServeConfig",
        setup() {
            const table = ref({
                key: "DataServeConfigId",
                editTable:true ,
                footer: "Foots",
                cnName: "数据采集服务配置",
                name: "mds_dataserveconfig/Mds_DataServeConfig",
                newTabEdit: false,
                url: "/Mds_DataServeConfig/",
                sortName: "DataServeConfigId"
            });
            const editFormFields = ref({"DbBlock":"","ReadLength":"","HttpName":"","HttpPath":"","HttpMethod":"","TcpName":"","TcpContent":""});
            const editFormOptions = ref([[{"title":"数据块-PLC","field":"DbBlock"}],
                              [{"title":"读取长度-PLC","field":"ReadLength","type":"number"},
                               {"title":"请求名-Http","field":"HttpName"}],
                              [{"title":"请求地址-Http","field":"HttpPath"},
                               {"title":"请求方法-Http","field":"HttpMethod"}],
                              [{"title":"指令名称","field":"TcpName"},
                               {"title":"指令发送内容","field":"TcpContent"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"DataServeConfigId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"DataServeId",title:"服务ID",type:"bigint",width:150,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"DbBlock",title:"数据块-PLC",type:"string",width:180,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"ReadLength",title:"读取长度-PLC",type:"int",width:110,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"HttpName",title:"请求名-Http",type:"string",width:150,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"HttpPath",title:"请求地址-Http",type:"string",width:180,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"HttpMethod",title:"请求方法-Http",type:"string",width:180,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"TcpName",title:"指令名称",type:"string",width:180,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"TcpContent",title:"指令发送内容",type:"string",width:150,edit:{type:""},showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,hidden:true,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
